package com.example.mp.controller;

import com.example.mp.bo.AccountBo;
import com.example.mp.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/***
 * @Author: hf
 * @Description: 登陆接口
 * @Date: 2023/10/30 16:24
 */
@Api(tags = "登陆接口")
@Slf4j
@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    private UserService userService;

    @ApiOperation("用户登录")
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public AccountBo login(@RequestBody AccountBo accountBo) {
        return userService.login(accountBo);
    }

}